Optimal. Leaf size=270 \[ -\frac {d \cos (c+d x)}{2 a x}-\frac {b \text {Ci}(d x) \sin (c)}{a^2}-\frac {d^2 \text {Ci}(d x) \sin (c)}{2 a}+\frac {b \text {Ci}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right ) \sin \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a^2}+\frac {b \text {Ci}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right ) \sin \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a^2}-\frac {\sin (c+d x)}{2 a x^2}-\frac {b \cos (c) \text {Si}(d x)}{a^2}-\frac {d^2 \cos (c) \text {Si}(d x)}{2 a}-\frac {b \cos \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Si}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 a^2}+\frac {b \cos \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Si}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{2 a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.35, antiderivative size = 270, normalized size of antiderivative = 1.00, number of steps
used = 18, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3426, 3378,
3384, 3380, 3383} \begin {gather*} -\frac {b \sin (c) \text {CosIntegral}(d x)}{a^2}+\frac {b \sin \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {CosIntegral}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{2 a^2}+\frac {b \sin \left (\frac {\sqrt {-a} d}{\sqrt {b}}+c\right ) \text {CosIntegral}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 a^2}-\frac {b \cos (c) \text {Si}(d x)}{a^2}-\frac {b \cos \left (\frac {\sqrt {-a} d}{\sqrt {b}}+c\right ) \text {Si}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 a^2}+\frac {b \cos \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Si}\left (x d+\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a^2}-\frac {d^2 \sin (c) \text {CosIntegral}(d x)}{2 a}-\frac {d^2 \cos (c) \text {Si}(d x)}{2 a}-\frac {\sin (c+d x)}{2 a x^2}-\frac {d \cos (c+d x)}{2 a x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3378
Rule 3380
Rule 3383
Rule 3384
Rule 3426
Rubi steps
\begin {align*} \int \frac {\sin (c+d x)}{x^3 \left (a+b x^2\right )} \, dx &=\int \left (\frac {\sin (c+d x)}{a x^3}-\frac {b \sin (c+d x)}{a^2 x}+\frac {b^2 x \sin (c+d x)}{a^2 \left (a+b x^2\right )}\right ) \, dx\\ &=\frac {\int \frac {\sin (c+d x)}{x^3} \, dx}{a}-\frac {b \int \frac {\sin (c+d x)}{x} \, dx}{a^2}+\frac {b^2 \int \frac {x \sin (c+d x)}{a+b x^2} \, dx}{a^2}\\ &=-\frac {\sin (c+d x)}{2 a x^2}+\frac {b^2 \int \left (-\frac {\sin (c+d x)}{2 \sqrt {b} \left (\sqrt {-a}-\sqrt {b} x\right )}+\frac {\sin (c+d x)}{2 \sqrt {b} \left (\sqrt {-a}+\sqrt {b} x\right )}\right ) \, dx}{a^2}+\frac {d \int \frac {\cos (c+d x)}{x^2} \, dx}{2 a}-\frac {(b \cos (c)) \int \frac {\sin (d x)}{x} \, dx}{a^2}-\frac {(b \sin (c)) \int \frac {\cos (d x)}{x} \, dx}{a^2}\\ &=-\frac {d \cos (c+d x)}{2 a x}-\frac {b \text {Ci}(d x) \sin (c)}{a^2}-\frac {\sin (c+d x)}{2 a x^2}-\frac {b \cos (c) \text {Si}(d x)}{a^2}-\frac {b^{3/2} \int \frac {\sin (c+d x)}{\sqrt {-a}-\sqrt {b} x} \, dx}{2 a^2}+\frac {b^{3/2} \int \frac {\sin (c+d x)}{\sqrt {-a}+\sqrt {b} x} \, dx}{2 a^2}-\frac {d^2 \int \frac {\sin (c+d x)}{x} \, dx}{2 a}\\ &=-\frac {d \cos (c+d x)}{2 a x}-\frac {b \text {Ci}(d x) \sin (c)}{a^2}-\frac {\sin (c+d x)}{2 a x^2}-\frac {b \cos (c) \text {Si}(d x)}{a^2}-\frac {\left (d^2 \cos (c)\right ) \int \frac {\sin (d x)}{x} \, dx}{2 a}+\frac {\left (b^{3/2} \cos \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right )\right ) \int \frac {\sin \left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{\sqrt {-a}+\sqrt {b} x} \, dx}{2 a^2}+\frac {\left (b^{3/2} \cos \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right )\right ) \int \frac {\sin \left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{\sqrt {-a}-\sqrt {b} x} \, dx}{2 a^2}-\frac {\left (d^2 \sin (c)\right ) \int \frac {\cos (d x)}{x} \, dx}{2 a}+\frac {\left (b^{3/2} \sin \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right )\right ) \int \frac {\cos \left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{\sqrt {-a}+\sqrt {b} x} \, dx}{2 a^2}-\frac {\left (b^{3/2} \sin \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right )\right ) \int \frac {\cos \left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{\sqrt {-a}-\sqrt {b} x} \, dx}{2 a^2}\\ &=-\frac {d \cos (c+d x)}{2 a x}-\frac {b \text {Ci}(d x) \sin (c)}{a^2}-\frac {d^2 \text {Ci}(d x) \sin (c)}{2 a}+\frac {b \text {Ci}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right ) \sin \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a^2}+\frac {b \text {Ci}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right ) \sin \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a^2}-\frac {\sin (c+d x)}{2 a x^2}-\frac {b \cos (c) \text {Si}(d x)}{a^2}-\frac {d^2 \cos (c) \text {Si}(d x)}{2 a}-\frac {b \cos \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Si}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 a^2}+\frac {b \cos \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Si}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{2 a^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.43, size = 247, normalized size = 0.91 \begin {gather*} -\frac {a d x \cos (c+d x)+\left (2 b+a d^2\right ) x^2 \text {Ci}(d x) \sin (c)-b x^2 \text {Ci}\left (d \left (\frac {i \sqrt {a}}{\sqrt {b}}+x\right )\right ) \sin \left (c-\frac {i \sqrt {a} d}{\sqrt {b}}\right )-b x^2 \text {Ci}\left (d \left (-\frac {i \sqrt {a}}{\sqrt {b}}+x\right )\right ) \sin \left (c+\frac {i \sqrt {a} d}{\sqrt {b}}\right )+a \sin (c+d x)+2 b x^2 \cos (c) \text {Si}(d x)+a d^2 x^2 \cos (c) \text {Si}(d x)-b x^2 \cos \left (c-\frac {i \sqrt {a} d}{\sqrt {b}}\right ) \text {Si}\left (d \left (\frac {i \sqrt {a}}{\sqrt {b}}+x\right )\right )+b x^2 \cos \left (c+\frac {i \sqrt {a} d}{\sqrt {b}}\right ) \text {Si}\left (\frac {i \sqrt {a} d}{\sqrt {b}}-d x\right )}{2 a^2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 259, normalized size = 0.96
method | result | size |
derivativedivides | \(d^{2} \left (-\frac {\sin \left (d x +c \right )}{2 a \,d^{2} x^{2}}-\frac {\cos \left (d x +c \right )}{2 a d x}+\frac {b \left (\sinIntegral \left (d x +c -\frac {d \sqrt {-a b}+c b}{b}\right ) \cos \left (\frac {d \sqrt {-a b}+c b}{b}\right )+\cosineIntegral \left (d x +c -\frac {d \sqrt {-a b}+c b}{b}\right ) \sin \left (\frac {d \sqrt {-a b}+c b}{b}\right )\right )}{2 a^{2} d^{2}}+\frac {b \left (\sinIntegral \left (d x +c +\frac {d \sqrt {-a b}-c b}{b}\right ) \cos \left (\frac {d \sqrt {-a b}-c b}{b}\right )-\cosineIntegral \left (d x +c +\frac {d \sqrt {-a b}-c b}{b}\right ) \sin \left (\frac {d \sqrt {-a b}-c b}{b}\right )\right )}{2 a^{2} d^{2}}-\frac {\left (d^{2} a +2 b \right ) \left (\sinIntegral \left (d x \right ) \cos \left (c \right )+\cosineIntegral \left (d x \right ) \sin \left (c \right )\right )}{2 a^{2} d^{2}}\right )\) | \(259\) |
default | \(d^{2} \left (-\frac {\sin \left (d x +c \right )}{2 a \,d^{2} x^{2}}-\frac {\cos \left (d x +c \right )}{2 a d x}+\frac {b \left (\sinIntegral \left (d x +c -\frac {d \sqrt {-a b}+c b}{b}\right ) \cos \left (\frac {d \sqrt {-a b}+c b}{b}\right )+\cosineIntegral \left (d x +c -\frac {d \sqrt {-a b}+c b}{b}\right ) \sin \left (\frac {d \sqrt {-a b}+c b}{b}\right )\right )}{2 a^{2} d^{2}}+\frac {b \left (\sinIntegral \left (d x +c +\frac {d \sqrt {-a b}-c b}{b}\right ) \cos \left (\frac {d \sqrt {-a b}-c b}{b}\right )-\cosineIntegral \left (d x +c +\frac {d \sqrt {-a b}-c b}{b}\right ) \sin \left (\frac {d \sqrt {-a b}-c b}{b}\right )\right )}{2 a^{2} d^{2}}-\frac {\left (d^{2} a +2 b \right ) \left (\sinIntegral \left (d x \right ) \cos \left (c \right )+\cosineIntegral \left (d x \right ) \sin \left (c \right )\right )}{2 a^{2} d^{2}}\right )\) | \(259\) |
risch | \(\frac {i b \,{\mathrm e}^{\frac {i b c +d \sqrt {a b}}{b}} \expIntegral \left (1, \frac {i b c +d \sqrt {a b}-b \left (i d x +i c \right )}{b}\right )}{4 a^{2}}+\frac {i b \,{\mathrm e}^{\frac {i b c -d \sqrt {a b}}{b}} \expIntegral \left (1, -\frac {-i b c +d \sqrt {a b}+b \left (i d x +i c \right )}{b}\right )}{4 a^{2}}-\frac {i d^{2} {\mathrm e}^{i c} \expIntegral \left (1, -i d x \right )}{4 a}-\frac {i b \,{\mathrm e}^{i c} \expIntegral \left (1, -i d x \right )}{2 a^{2}}-\frac {i b \,{\mathrm e}^{-\frac {i b c +d \sqrt {a b}}{b}} \expIntegral \left (1, -\frac {i b c +d \sqrt {a b}-b \left (i d x +i c \right )}{b}\right )}{4 a^{2}}-\frac {i b \,{\mathrm e}^{-\frac {i b c -d \sqrt {a b}}{b}} \expIntegral \left (1, \frac {-i b c +d \sqrt {a b}+b \left (i d x +i c \right )}{b}\right )}{4 a^{2}}+\frac {i d^{2} {\mathrm e}^{-i c} \expIntegral \left (1, i d x \right )}{4 a}+\frac {i {\mathrm e}^{-i c} \expIntegral \left (1, i d x \right ) b}{2 a^{2}}-\frac {d \cos \left (d x +c \right )}{2 a x}-\frac {\sin \left (d x +c \right )}{2 a \,x^{2}}\) | \(343\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 0.39, size = 231, normalized size = 0.86 \begin {gather*} \frac {i \, {\left (a d^{2} + 2 \, b\right )} x^{2} {\rm Ei}\left (i \, d x\right ) e^{\left (i \, c\right )} - i \, {\left (a d^{2} + 2 \, b\right )} x^{2} {\rm Ei}\left (-i \, d x\right ) e^{\left (-i \, c\right )} - i \, b x^{2} {\rm Ei}\left (i \, d x - \sqrt {\frac {a d^{2}}{b}}\right ) e^{\left (i \, c + \sqrt {\frac {a d^{2}}{b}}\right )} - i \, b x^{2} {\rm Ei}\left (i \, d x + \sqrt {\frac {a d^{2}}{b}}\right ) e^{\left (i \, c - \sqrt {\frac {a d^{2}}{b}}\right )} + i \, b x^{2} {\rm Ei}\left (-i \, d x - \sqrt {\frac {a d^{2}}{b}}\right ) e^{\left (-i \, c + \sqrt {\frac {a d^{2}}{b}}\right )} + i \, b x^{2} {\rm Ei}\left (-i \, d x + \sqrt {\frac {a d^{2}}{b}}\right ) e^{\left (-i \, c - \sqrt {\frac {a d^{2}}{b}}\right )} - 2 \, a d x \cos \left (d x + c\right ) - 2 \, a \sin \left (d x + c\right )}{4 \, a^{2} x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sin {\left (c + d x \right )}}{x^{3} \left (a + b x^{2}\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sin \left (c+d\,x\right )}{x^3\,\left (b\,x^2+a\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________